﻿using System;
using Components.Data.Fields;
using Components.Data.UI;
using Components.Data.UI.Controls;
using System.Collections.Generic;

namespace Components.Data.Elements
{
  public class Element
  {
    public Element()
    {
      ID = new Guid();
      Fields = new FieldCollection();
      Presentation = new Presentation();
    }

    public String this[String key]
    {
      get
      {
        Field field = this.Fields[key];

        if (field != null)
          return field.Value;

        return String.Empty;
      }
    }

    public Guid ID { get; internal set; }

    public FieldCollection Fields { get; internal set; }

    public Presentation Presentation { get; internal set; }
  }
}